package com.example.ftp;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.io.Util;

import com.example.ftp.service.FTPClientService;

public class FTPClientExampleClass {
	public static final String host = "az84ap41";//"chdpmdds";
	public static final String userName = "b02534";//"dataxfer";
	public static final String password = "Melissa11";//"MddsData-123";
	public static final String targetPath = "/test.txt";
	
	public static void main(String... args) throws Exception{
		Map<String, String> configMap = null;
		
		configMap = new HashMap<>(3);
		
		configMap.put("ftp.host", host);
		configMap.put("ftp.userName", userName);
		configMap.put("ftp.password", password);
		
		new FTPClientService().copyFile(configMap, new FileInputStream("/Mau/downloads/test.txt"), targetPath);
	}
}